Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
59599289
Commit
59599289
authored
Dec 08, 2016
by
Alexey.Musinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utils
parent
5157908b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
DesktopEditor/common/Mac/NSFileManager+Utils.h
DesktopEditor/common/Mac/NSFileManager+Utils.h
+1
-0
DesktopEditor/common/Mac/NSFileManager+Utils.m
DesktopEditor/common/Mac/NSFileManager+Utils.m
+8
-1
No files found.
DesktopEditor/common/Mac/NSFileManager+Utils.h
View file @
59599289
...
...
@@ -42,4 +42,5 @@
@interface
NSFileManager
(
Utils
)
-
(
BOOL
)
copyFolderAtPath
:(
NSString
*
)
sourceFolder
toDestinationFolderAtPath
:(
NSString
*
)
destinationFolder
;
-
(
NSString
*
)
createTemporaryDirectory
;
-
(
void
)
createDirectory
:(
NSString
*
)
directory
;
@end
DesktopEditor/common/Mac/NSFileManager+Utils.m
View file @
59599289
...
...
@@ -68,7 +68,7 @@
NSError
*
error
=
nil
;
NSString
*
path
=
[
NSString
stringWithFormat
:
@"%@%@"
,
NSTemporaryDirectory
(),
[
NSUUID
UUID
].
UUIDString
];
if
(
!
[
[
NSFileManager
defaultManager
]
createDirectoryAtPath
:
path
withIntermediateDirectories
:
YES
attributes
:
nil
error
:&
error
])
if
(
!
[
self
createDirectoryAtPath
:
path
withIntermediateDirectories
:
YES
attributes
:
nil
error
:&
error
])
{
NSLog
(
@"Could not creat temp path %@. error %@"
,
path
,
error
);
return
@""
;
...
...
@@ -77,4 +77,11 @@
return
path
;
}
-
(
void
)
createDirectory
:(
NSString
*
)
directory
{
NSError
*
error
=
nil
;
if
(
!
[
self
createDirectoryAtPath
:
directory
withIntermediateDirectories
:
YES
attributes
:
nil
error
:&
error
])
{
NSLog
(
@"Failed to create directory
\"
%@
\"
. Error: %@"
,
directory
,
error
);
}
}
@end
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