Skip to content

feat(file-system): append , appendText & createFile (Android only) #10285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2023

Conversation

triniwiz
Copy link
Member

@triniwiz triniwiz commented May 4, 2023

Allows appending content using native instances( byte[] & NSData), JS Buffers & string.

createFile is an android only helper method for creating files outside of your app e.g Downloads, Audio or Video directory. The following for will create a file in Downloads/NativeScript/thedate.txt with the content some text

		const file = File.android.createFile({
			directory: AndroidDirectory.DOWNLOADS,
			name: `${Date.now()}.txt`,
			mime: 'text/plain',
			relativePath: `NativeScript`,
		});

		file.writeTextSync('some text');

@nx-cloud
Copy link

nx-cloud bot commented May 4, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 037e40d. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

@cla-bot cla-bot bot added the cla: yes label May 4, 2023
@NathanWalker NathanWalker merged commit ab32aea into main May 5, 2023
@NathanWalker NathanWalker deleted the feat/fs-helpers branch May 5, 2023 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants