Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
13a752cd
Kaydet (Commit)
13a752cd
authored
Ock 19, 2012
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sal: expose a public API for comparing directory items
Windows impl. still pending.
üst
9f03ad24
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
3 deletions
+51
-3
file.h
sal/inc/osl/file.h
+24
-0
file.hxx
sal/inc/osl/file.hxx
+25
-1
sal.map
sal/util/sal.map
+1
-1
strmunx.cxx
tools/source/stream/strmunx.cxx
+1
-1
No files found.
sal/inc/osl/file.h
Dosyayı görüntüle @
13a752cd
...
@@ -316,6 +316,30 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_acquireDirectoryItem(
...
@@ -316,6 +316,30 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_acquireDirectoryItem(
SAL_DLLPUBLIC
oslFileError
SAL_CALL
osl_releaseDirectoryItem
(
SAL_DLLPUBLIC
oslFileError
SAL_CALL
osl_releaseDirectoryItem
(
oslDirectoryItem
Item
);
oslDirectoryItem
Item
);
/** Determine if two directory items point the the same underlying file
The comparison is done first by URL, and then by resolving links to
find the target, and finally by comparing inodes on unix.
@param pItemA [in]
A directory handle to compare with another handle
@param pItemB [in]
A directory handle to compare with pItemA
@return
sal_True: if the items point to an identical resource<br>
sal_False: if the items point to a different resource, or a fatal error occured<br>
@see osl_getDirectoryItem()
@since LibreOffice 3.6
*/
SAL_DLLPUBLIC
sal_Bool
SAL_CALL
osl_identicalDirectoryItem
(
oslDirectoryItem
pItemA
,
oslDirectoryItem
pItemB
);
/* File types */
/* File types */
typedef
enum
{
typedef
enum
{
...
...
sal/inc/osl/file.hxx
Dosyayı görüntüle @
13a752cd
...
@@ -1389,9 +1389,9 @@ public:
...
@@ -1389,9 +1389,9 @@ public:
class
DirectoryItem
:
public
FileBase
class
DirectoryItem
:
public
FileBase
{
{
oslDirectoryItem
_pData
;
public
:
public
:
oslDirectoryItem
_pData
;
/** Constructor.
/** Constructor.
*/
*/
...
@@ -1529,6 +1529,30 @@ public:
...
@@ -1529,6 +1529,30 @@ public:
return
(
RC
)
osl_getFileStatus
(
_pData
,
&
rStatus
.
_aStatus
,
rStatus
.
_nMask
);
return
(
RC
)
osl_getFileStatus
(
_pData
,
&
rStatus
.
_aStatus
,
rStatus
.
_nMask
);
}
}
/** Determine if two directory items point the the same underlying file
The comparison is done first by URL, and then by resolving links to
find the target, and finally by comparing inodes on unix.
@param pItemA [in]
A directory handle to compare with another handle
@param pItemB [in]
A directory handle to compare with pItemA
@return
sal_True: if the items point to an identical resource<br>
sal_False: if the items point to a different resource, or a fatal error occured<br>
@see osl_getDirectoryItem()
@since LibreOffice 3.6
*/
inline
sal_Bool
isIdenticalTo
(
const
DirectoryItem
&
pOther
)
{
return
osl_identicalDirectoryItem
(
_pData
,
pOther
.
_pData
);
}
friend
class
Directory
;
friend
class
Directory
;
};
};
...
...
sal/util/sal.map
Dosyayı görüntüle @
13a752cd
...
@@ -613,6 +613,7 @@ LIBO_UDK_3.5 { # symbols available in >= LibO 3.5
...
@@ -613,6 +613,7 @@ LIBO_UDK_3.5 { # symbols available in >= LibO 3.5
LIBO_UDK_3.6 { # symbols available in >= LibO 3.6
LIBO_UDK_3.6 { # symbols available in >= LibO 3.6
global:
global:
osl_unmapMappedFile;
osl_unmapMappedFile;
osl_identicalDirectoryItem;
} UDK_3.10;
} UDK_3.10;
PRIVATE_1.0 {
PRIVATE_1.0 {
...
@@ -647,7 +648,6 @@ PRIVATE_textenc.1 { # LibreOffice 3.6
...
@@ -647,7 +648,6 @@ PRIVATE_textenc.1 { # LibreOffice 3.6
PRIVATE_file.1 { # LibreOffice 3.6
PRIVATE_file.1 { # LibreOffice 3.6
global:
global:
osl_identicalDirectoryItem;
osl_getFileOSHandle;
osl_getFileOSHandle;
};
};
...
...
tools/source/stream/strmunx.cxx
Dosyayı görüntüle @
13a752cd
...
@@ -146,7 +146,7 @@ sal_Bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, SvFileStr
...
@@ -146,7 +146,7 @@ sal_Bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, SvFileStr
for
(
size_t
i
=
0
;
i
<
rLockList
.
size
();
++
i
)
for
(
size_t
i
=
0
;
i
<
rLockList
.
size
();
++
i
)
{
{
pLock
=
rLockList
[
i
];
pLock
=
rLockList
[
i
];
if
(
osl_identicalDirectoryItem
(
aItem
.
_pData
,
pLock
->
m_aItem
.
_pData
)
)
if
(
aItem
.
isIdenticalTo
(
pLock
->
m_aItem
)
)
{
{
sal_Bool
bDenyByOptions
=
sal_False
;
sal_Bool
bDenyByOptions
=
sal_False
;
StreamMode
nLockMode
=
pLock
->
m_pStream
->
GetStreamMode
();
StreamMode
nLockMode
=
pLock
->
m_pStream
->
GetStreamMode
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment